package com.dc.datacollect.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dc.datacollect.dto.ExpeditingUserDTO;
import com.dc.datacollect.dto.GroupUserDTO;
import com.dc.datacollect.dto.output.CollectAssociatedGroupOutput;
import com.dc.datacollect.dto.output.CollectUserOutput;
import com.dc.datacollect.dto.output.ConsoleCollectOutput;
import com.dc.datacollect.entity.Collect;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dc.datacollect.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author zhuangjie
* @description 针对表【collect(收集表)】的数据库操作Mapper
* @createDate 2023-06-21 16:07:26
* @Entity com.dc.datacollect.entity.Collect
*/
public interface CollectMapper extends BaseMapper<Collect> {


    List<Collect> selectUnCommittedAndNotExpired(@Param("userId") Long userId);
    List<Collect> selectUnCommittedAndExpired(@Param("userId") Long userId);
    List<Collect> selectInProgress(@Param("userId") Long userId);
    Page<Collect> selectEndedUnCompleteCollectList(@Param("page") Page<Collect> page, @Param("keyword") String keyword,@Param("userId") Long userId);
    Page<Collect> selectEndedCompleteCollectList(@Param("page") Page<Collect> page, @Param("keyword") String keyword,@Param("userId") Long userId);
    Page<ConsoleCollectOutput> selectConsolePage(@Param("page") Page<ConsoleCollectOutput> page, @Param("keyword") String keyword, @Param("collectorId") Long collectorId);


    Page<CollectUserOutput> selectCollectUserPage(@Param("page") Page<CollectUserOutput> page, @Param("collectId") Long collectId, @Param("keyword") String keyword, @Param("groupId") Long groupId, @Param("status") Short status);

    List<CollectAssociatedGroupOutput> selectCollectGroupList(@Param("collectId") Long collectId);

    List<ExpeditingUserDTO> getCollectUnSubmitUser(@Param("collectId") Long collectId);

    List<GroupUserDTO> selectUserByGroupIds(@Param("groupIds") List<Long> groupIds);


}




